<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>01新增长度单位</title>
    <style>
      * {
        margin: 0;
        padding: 0;
      }

      .box1 {
        width: 200px;
        height: 200px;
        background-color: skyblue;
      }

      .box2 {
        /* 视口宽度的百分之50，和视口宽度的百分之20 一般都是用vw*/
        width: 50vw;
        height: 20vw;
        background-color: green;
      }
    </style>
  </head>
  <body>
    <div class="box1">像素</div>
    <div class="box2">vw</div>
  </body>
</html>
